package com.easylive.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: yudaxian
 * @DateTime: 2024/12/23 15:13
 **/
@Getter
@AllArgsConstructor
public enum MessageTypeEnum {
    SYS(1, "系统消息"),
    LIKE(2, "点赞消息"),
    COLLECTION(3, "收藏消息"),
    COMMENT(4, "评论消息")
    ;

    private Integer type;

    private String desc;

    public static MessageTypeEnum getByType(Integer type) {
        for (MessageTypeEnum messageTypeEnum : values()) {
            if (messageTypeEnum.getType().equals(type)) {
                return messageTypeEnum;
            }
        }
        return null;
    }
}
